1. Field of the Invention
The present invention relates generally to a load-balancing method in a mobile terminal, and more particularly, to a load-balancing method for equalizing the utilization rate of each of the Central Processing Units (CPUs) in a portable terminal having multi-cores (e.g., a plurality of CPUs).
2. Description of the Related Art
Embedded devices have typically had a simple structure, and thus, have successfully performed a certain mission. For example, a phone has successfully performed a simple calling function, and a TV has successfully performed a simple TV viewing function. However, recently, manufacturers of the embedded devices have adopted multi-core based high-performance smart embedded devices. Embedded devices are also rapidly moving from the traditional single core to a multi-core. In particular, as the business trend of the portable terminal market is changed, load balancing technologies in an Operating System (OS) level are becoming more important for high performance and power management in a multi-core based embedded mobile environment.
An existing load balancer periodically performs a load-balancing operation when a load is not in a balanced state in order to maintain the optical CPU utilization rate. This scheme generates unnecessary task migration even though the CPU utilization rate is not 100%.
If the CPU load is not balanced (i.e., the utilization rates of the CPUs are not equal), a current Linux™ multicore scheduler performs load balancing to resolve load inequality of the multicore.
Based on the profiling and analysis on the operation structure of the existing load balancer, the multicore-based portable terminal has losses such as, for example, cache invalidation, a scheduling latency, power consumption, etc. The conventional load balancer performs load balancing by periodically checking whether the loads of the CPUs are unequal. The conventional load balancer checks the number of tasks that are being performed and are on the run queue of the CPU, and delays the number of times the load balance( ) function is called based on the checked number, thereby minimizing the costs generated due to load balancing. However, whenever load balancing occurs in the CPU, a task migration is performed, and the costs are not considered. However, whenever the loads of the CPUs become unbalanced, task migration is still performed and such costs are not considered. In the multi-core environment, the task migration more frequently occurs if there are more unbalanced situations for the loads of the CPUs. If the migration kernel threshold having the highest priority in the CPU performs double locking for the task allocated to the threshold before performing task migration, other tasks non-voluntarily lose the priority. As the tasks that frequently use CPUs increase, task migration more frequently occurs. As a result, the conventional load balancing method for equalizing CPU utilization rates increases the costs of cache invalidation, scheduling latency, power consumption, etc.